package com.entity.servicedetails;

import com.baomidou.mybatisplus.annotation.*;
import com.config.CustomLocalDateTimeDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("service_details")
@ApiModel("服务明细表实体类")
public class ServiceDetailsDto {

        @ApiModelProperty(value = "主键ID")
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        @ApiModelProperty(value = "售后单号")
        @TableField("service_order_number")
        private String serviceOrderNumber;

        @ApiModelProperty(value = "售后单位（客户名）")
        @TableField("company_name")
        private String companyName;

        @ApiModelProperty(value = "开始时间")
        @TableField("start_time")
        @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
        private LocalDateTime startTime;

        @ApiModelProperty(value = "结束时间")
        @TableField("end_time")
        @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
        private LocalDateTime endTime;

    @ApiModelProperty(value = "服务天数")
    @TableField("service_days")
    private Double serviceDays;

    @ApiModelProperty(value = "服务人员")
    @TableField("service_personnel")
    private String servicePersonnel;

        @ApiModelProperty(value = "差旅费")
        @TableField("travel_expense")
        private Double travelExpense;

        @ApiModelProperty(value = "创建时间")
        @TableField(value = "created_time", fill = FieldFill.INSERT)
        private LocalDateTime createdTime;

        @ApiModelProperty(value = "更新时间")
        @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
        private LocalDateTime updatedTime;

        @ApiModelProperty(value = "逻辑删除标识 1:正常 0:删除")
        @TableField("is_deleted")
        private Integer isDeleted = 1;

}
